﻿using Microsoft.Web.WebPages.OAuth;
using System.Web.Mvc;

namespace Inovout.Web.Mvc
{
    public class AccountAuthenticationResult : ActionResult
    {
        public AccountAuthenticationResult(string provider, string returnUrl)
        {
            Provider = provider;
            ReturnUrl = returnUrl;
        }

        public string Provider { get; private set; }
        public string ReturnUrl { get; private set; }

        public override void ExecuteResult(ControllerContext context)
        {
            OAuthWebSecurity.RequestAuthentication(Provider, ReturnUrl);
        }
    }

}
